﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using BUSAuction;
using DTOAuction;

namespace _HTTT_HD_QuanLyGiaoDuc_WebService
{
    /// <summary>
    /// Summary description for ServiceXuLyThongTinSinhVien
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class ServiceXuLyThongTinSinhVien : System.Web.Services.WebService
    {
        [WebMethod]
        public int themSinhVien(int maSinhVien, int maKhoa, int maKhoaHoc, string hoTen, int gioiTinh, DateTime ngaySinh, string noiSinh, string diaChi, string email, string soDienThoai, string matKhau, string tenDangNhap)
        {
            BUSSinhVien busSinhVien = new BUSSinhVien();
            return busSinhVien.themSinhVien(maSinhVien, maKhoa, maKhoaHoc, hoTen, gioiTinh, ngaySinh, noiSinh, diaChi, email, soDienThoai, matKhau, tenDangNhap);
        }

		/// <summary>
		/// author: hqlam
		/// </summary>
		[WebMethod]
		public bool kiemTraThongTinSinhVien(int maSinhVien)
		{
			bool res = true;
			try
			{
				return BUSSinhVien.kiemTraThongTinSinhVien(maSinhVien);
			}
			catch
			{
				res = false;
			}
			return res;
		}

		/// <summary>
		/// author: hqlam
		/// </summary>
		[WebMethod]
		public SINHVIEN layThongTinSinhVien(int maSinhVien)
		{
			return BUSSinhVien.layThongTinSinhVien(maSinhVien);
		}

	}
}
